#ifndef __COMMON_H__
#define	__COMMON_H__

#include <stdint.h>

#define DLL_API

#ifdef __cplusplus
#define EXTERN_C_BLOCKSTART extern "C" {
#define EXTERN_C_BLOCKEND }
#else // __cplusplus
#define EXTERN_C_BLOCKSTART
#define EXTERN_C_BLOCKEND
#endif // __cplusplus




#if defined(NO_INLINE)
#define INLINE static
#elif defined(__IAR_SYSTEMS_ICC__)
/* Reference to http://netstorage.iar.com/SuppDB/Public/SUPPORT/005605/Example%201.pdf
 * 如果要打开内联函数, IAR编译器优化要设定为中级或以上,
 * 具体在Project->Options->C/C++ compiler->Optimizations->Level(Medium or High)
 */
#define PRAGMA(x) _Pragma(#x)
#define INLINE PRAGMA(inline=forced)
#elif !defined(INLINE)
#define INLINE static
#endif

typedef uint8_t bool;

#define	true	1
#define	false	0

#endif